package com.free.ext.mybatis.delegate;

import com.free.common.vo.PageResponseVo;
import tk.mybatis.mapper.entity.Example;

import java.util.List;

public interface ICommonDao<T,K> {
    T get(K key);

    T add(T entity);

    int delete(K key);

    int deleteByCondition(T obj);

    int update(T entity);

    T selectOne(T cond);

    int selectCount(T cond);

    int selectCountByExample(Object example);

    List<T> selectList(T cond, String orderBy);

    Example getConditionExample();

    PageResponseVo<T> selectByPageNo(T condition, String orderBy, int pageNo, int pageSize);
}
